/* =========================================================================
 *
 *   The traffic processor.
 *
 *   Development by Sedelnikov Alexander (Bigking).
 *
 * =========================================================================
 */

#ifndef __TRANSACTIONS_H__
#define __TRANSACTIONS_H__


#include "conf.h"
#include "trf_parser.h"


//-----------------------------------------------------------------------//
class ctransaction
{


    char                   unical_identifier[ 32 ];
    std::vector<char*>     files;


protected:


    void generate_uid();

public:

    ctransaction();
    ~ctransaction();

    void append_file( const char *src_file_name,
                      const char *copy_file_name );

    const char* get_unical_id( ) const;

    void set_time( const time_stamp &ts );
    void begin();
    void end();
    void rollback()  {    /*NOP*/   }
    void commit()    {    end();    }

    static void check_xlog( );


//-----------------------------------------------------------------------//
EXCEPTION( e_error );


};


#endif
